<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let ofrom = new FormData()
        //添加数据 set(key=>value)
        ofrom.set('name', 'admin')
        //set会覆盖数据
        ofrom.set('pwd', '123')
        //append追加数据
        ofrom.append('name', '123')
        ofrom.append('name', '123')
        //删除数据
        ofrom.delete('pwd')
        //get根据key获取对应数据
        //getAll根据key获取对应全部数据
        console.log(ofrom.getAll('name'));
        console.log(ofrom.getAll('pwd'));
    </script>
</body>

</html>